#ifndef FRMMAIN_H
#define FRMMAIN_H

#include <QMainWindow>
#include <QMessageBox>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QSslError>
#include <QtXml/QDomDocument>
#include <QtXml/QDomNode>
#include <QVBoxLayout>
#include <QFile>
#include <QTimer>
#include <QDir>
#include <QTextStream>
#include <QWebFrame>
#include <QDesktopServices>
#include <includes/twitcurl.h>


namespace Ui {
class frmMain;
}

class frmMain : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit frmMain(QWidget *parent = 0);
    ~frmMain();
    QTimer *timerUpdate;
    void loadConfig();
    void saveConfig();
    QString homeXML;
    QString repliesXML;
    QString dmXML;
    void refreshTimelines();
    void showTimeline(QString tl);
    std::string reply_to_id;
    
private slots:
    void on_btnAbout_clicked();
    void sslErrorHandler(QNetworkReply* qnr, const QList<QSslError> & errlist);
    void OntimerUpdate();
    void showAuthWin();
    void finishLoading(bool);
    void showUserInfo(std::string response);
    QString processText(const QString text);
    void on_webView_linkClicked(const QUrl &arg1);
    void on_btnHome_clicked();
    void on_btnReplies_clicked();
    void on_btnDM_clicked();

    void on_lineEdit_returnPressed();

    void on_btnHelp_clicked();

private:
    Ui::frmMain *ui;
};

#endif // FRMMAIN_H
